package com.zhg.recorddemo.helper

/**
 * desc:  todo
 * author: ZHG
 * date: 2020/3/12
 */
class TimeFormatUtils {
    companion object{
        fun formatTimeUs(timeUs: Long): String {
            val second = timeUs / 1000000
            var ms = (timeUs / 10000 % 100).toString()
            ms = if (1 == ms.length) "0$ms" else ms
            var s = (second % 60).toString()
            s = if (1 == s.length) "0$s" else s
            var m = (second / 60).toString()
            m = if (1 == m.length) "0$m" else m
            return "$m:$s.$ms"
        }
    }
}